//
//  YBMessageCell.swift
//  Moonlight
//
//  Created by 清风徐来 on 2023/6/30.
//  Copyright © 2023 Moonlight Game Streaming Project. All rights reserved.
//

import UIKit
import SDWebImage

class YBMessageCell: UITableViewCell {

    @IBOutlet weak var img: UIImageView!
    @IBOutlet weak var title: UILabel!
    @IBOutlet weak var time: UILabel!
    @IBOutlet weak var discription: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
        
        self.selectionStyle = .none
        self.backgroundColor = .clear
        self.contentView.backgroundColor = .clear
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}


// MARK: - Public
extension YBMessageCell {
    
    func updateCell(by model: YBMessageModel) {
        img.sd_setImage(with: URL(string: model.coverImg))
        title.text = model.title
        time.text = model.createTime
        discription.text = model.content
    }
    
}
